﻿#ifndef PST_DialogAddLocalRange_H
#define PST_DialogAddLocalRange_H

#include <IdaDialogFrame>
#include <QModelIndexList>
#include <QStringListModel>
QT_BEGIN_NAMESPACE
namespace Ui
{
    class DialogAddLocalRange;
};
QT_END_NAMESPACE

namespace pst
{
    class DataChosenListDialog;
    class DialogAddLocalRange : public IdaDialogFrame
    {
        Q_OBJECT

    public:
        DialogAddLocalRange(QWidget* parent = nullptr);
        ~DialogAddLocalRange();
        void setIsEdit(bool f);
        void setInit(QStringList& params);
        void setCurveNameList(const QList<QString>& curveNameList);

    signals:
        void signal_sendLocalScopeData(double rangeLower, double rangeUpper, const QList<QString>& selectNames, bool &execFlag, bool edit);

    public slots:
        void on_pushButton_confirm_clicked();
        void on_pushButton_cancel_clicked();
        void slot_sentChosenDataIds(const QModelIndexList& chosenID);
        void on_pushButton_Curve_clicked();
    private:
        QModelIndexList createSelectedIndexes(const QStringList& params);

    private:
        Ui::DialogAddLocalRange* ui;
        DataChosenListDialog* m_dataChosenListDialog;
        QList<QString> m_curveNameList;
        QList<int> m_selectedIndexs;

        QStringListModel m_model;
        bool m_edit;
    };
} // namespace pst

#endif
